package com.aivin.dao;

import com.aivin.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * Created by Administrator on 2016/8/19.
 */
public interface ITbUserDao {
    /**
     * 根据id查找对象
     * @param userId
     * @return
     */
    TbUser queryById(int userId);


    /**
     * 根据偏移量查找全部信息 。 分页查询 . 用户。
     * @return
     */
    public List<TbUser> queryAllUserFy(@Param( "offset") int offset  , @Param("limit") int limit) ;

    @Deprecated
    public TbUser  getUserInfoByUserId(@Param( "userId")  int userId);

    public TbUserV1  getUserInfoByUserIdV1(@Param( "userId")  int userId);


    public int addFollowdStateByUserId( @PathVariable  FollowUserBean bean)  ;

    public FollowUserBean getfollowdStateByUser(@PathVariable int followdUserId   , @PathVariable   int userId  );

    public int  setFollowedStateByUserId(@PathVariable int userFollowedId   ,@PathVariable int userId  ,@PathVariable int followedState );

    /**是否存在  */
    public List<TbUserV1>  checkUserExist( @PathVariable String userName     ) ;
    /**密码登陆*/
    public TbUserV1 loginByPwd(@PathVariable String userName   , @PathVariable String  userPwd  ) ;
    /**用户账号注册*/
    public int regByPwd( @PathVariable  TbUserV1 bean)  ;

    /**用户是否存在-第三方登录*/
    public  List<TbUserV1>   checkUserExistByThird(@PathVariable String uuid  ,@PathVariable String platform) ;

    /**查询关注的用户列表**/
    public  List<FollowUserBean>   getfollowdListByUserId(@PathVariable  int  userId  ,@PathVariable int  offset ,@PathVariable int  limit ) ;
    /***根据用户id查询用户信息*/

    /**更新验证码**/
    public int  updataVtCodeAndTime( @PathVariable int userId ,@PathVariable String vtCode ,@PathVariable String reqTime );

    /**更新用户头像**/
    public  int  upDateUserImgUrl(   @PathVariable  int userId , @PathVariable  String imgUrl   ) ;
    /**更新用户密码*/
    public  int  upDateUserPwd(   @PathVariable  int userId , @PathVariable  String userPwd   ) ;

    /** 绑定、更新用户 电话号码*/
    public  int  bindOrUpDateUserTel( @PathVariable  int userId,  @PathVariable  String userTel) ;
    /**更新用户昵称*/
    public  int  upDateUserNickeName(  @PathVariable    int userId ,   @PathVariable String nickName   ) ;
}
